CREATE TABLE dws_cusc_demand_sign_network_summary
(
    sign_early_scansitecode  varchar(50) COMMENT '第一次签收网点code',
    sign_agent_code          varchar(50) COMMENT '签收网点所属代理区code',
    sign_fran_code           varchar(50) COMMENT '签收网点所属加盟商code',
    sign_early_scansite_name varchar(100) COMMENT '第一次签收网点名称',
    sign_agent_name          varchar(100) COMMENT '签收网点所属代理区名称',
    sign_fran_name           varchar(100) COMMENT '签收网点所属加盟商名称',
    sign_provider_id         varchar(50) COMMENT '签收网点所在省份id',
    sign_provider_desc       varchar(100) COMMENT '签收网点所在省份名称',
    sign_city_id             varchar(50) COMMENT '签收网点所在城市id',
    sign_city_desc           varchar(100) COMMENT '签收网点所在城市名称',
    need_call_num            int(11) COMMENT '应电联量',
    have_call_num            int(11) COMMENT '已电联量',
    call_rate                double COMMENT '电联率',
    gt6_seconds              int(11) COMMENT '通话时长大于6秒',
    gt6_seconds_rate         double COMMENT '6秒接通率',
    performance_bill_num     int(11) COMMENT '履约票数',
    performance_bill_rate    double COMMENT '履约率',
    sign_early_scantime      date COMMENT '第一次签收时间'
) ENGINE = OLAP DUPLICATE KEY(sign_early_scansitecode, sign_agent_code, sign_fran_code)
COMMENT '按需配送签收维度汇总(粒度网点)'
PARTITION BY RANGE(sign_early_scantime)
(START ('2023-04-01') END ('2023-06-07') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(sign_early_scansitecode) BUCKETS 2
PROPERTIES (
'replication_num' = '3',
'dynamic_partition.enable' = 'true',
'dynamic_partition.time_unit' = 'DAY',
'dynamic_partition.time_zone' = 'Asia/Shanghai',
'dynamic_partition.start' = '-180',
'dynamic_partition.end' = '4',
'dynamic_partition.prefix' = 'p',
'dynamic_partition.buckets' = '2',
'in_memory' = 'false',
'storage_format' = 'V2'
);